import request from "@/utils/request.js";
import utils from "@/utils/utils.js"
export default {
	getList(params) {
		return request({
			url: 'api/device/page',
			method: 'post',
			header: {isToken: false},
			data: params
		})
	},
	addDeviceOrder(params) {
		return request({
			url: 'api/device/maintain/save',
			method: 'post',
			// header: {isToken: false},
			data: params
		})
	},
	getOrderList(params) {
		return request({
			url: 'api/device/maintain/page',
			method: 'post',
			data: params
		})
	},
	getPersonOrderList(params) {
		return request({
			url: 'api/device/maintain/person/page',
			// header: {isToken: false},
			method: 'get',
			data: params
		})
	},
	// 新建订单
	add(params) {
		return request({
			url: 'system/order',
			method: 'post',
			data: params
		})
	},
	// 取消订单
	cancel(params) {
		return request({
			url: 'system/order?' + utils.jsonToQuery(params),
			method: 'put',
			data: params
		})
	},
	// 修改订单
	edit(params) {
		return request({
			url: 'system/order?' + utils.jsonToQuery(params),
			method: 'put',
			data: params
		})
	},
	// 订单详情
	detail(params) {
		return request({
			url: 'system/order/' + params.bm,
			method: 'get',
			data: params
		})
	},
	// 寄卖
	jm(params) {
		return request({
			url: 'system/jm',
			method: 'post',
			data: params
		})
	},
	// 订单详情
	status(params) {
		return request({
			url: 'system/order/status',
			method: 'get',
			data: params
		})
	},
}
